Skip to content

Conversation

evenkkl
Copy link
Member

@evenkkl evenkkl commented Sep 16, 2026

Summary

Accessibility pass for the library controls and book viewer before delivery.

Loading, empty-result and changed-book feedback is now announced through a single status region that is always present, so screen readers pick up each change reliably. Errors are still announced through an alert.

Keyboard focus is no longer lost at the first/last book or when removing a favorite, and the no-cover fallback now names the book, matching the cover's alt text.

Changes

  • Moved loading and empty-result messages into one persistent role="status" region in App
  • Announces the current book in the status region when it changes (e.g. "Showing book 2 of 3: The Hobbit")
  • Removed aria-live from the 2 / 3 counter so the change is not announced twice
  • Replaced disabled with aria-disabled on Previous/Next so the buttons keep focus at the first/last book
  • Moves focus to the Favorites heading after removing a favorite
  • Includes the book title in the no-cover fallback (No cover available for <title>)
  • Reviewed SubjectFilter, SortSelect, BookJumpList and FavoriteButton; no changes needed
  • Added/updated tests for status announcements, aria-disabled focus behaviour, keyboard activation, focus after removal, the no-cover fallback, and keyboard-only use of the library
  • Updated the App, BookCard, NavigationControls and FavoritesView snapshots deliberately to reflect the markup changes above

Testing

  • npm run format:check
  • npm run lint
  • npm test
  • npm run build

AI assistance

AI was used to assist with implementation and test development. The changes were reviewed before submission.

Closes #31

- Announce loading, empty-result and changed-book feedback through one
  persistent role="status" region in App; errors keep role="alert"
- Keep Previous/Next focusable at the boundaries with aria-disabled
  instead of disabled
- Move focus to the Favorites heading after removing a favorite
- Include the book title in the no-cover fallback to match the alt text
- Add tests for the announcements, focus handling and keyboard-only use
- Update App, BookCard, FavoritesView and NavigationControls snapshots
  deliberately for the markup changes above

Closes #31

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@evenkkl evenkkl added type: feature New functionality or requirement area: a11y Accessibility: semantics, labels, focus priority: high Required for first delivery labels Sep 16, 2026
@evenkkl evenkkl added this to the M4 — Quality milestone Sep 16, 2026
@evenkkl evenkkl self-assigned this Sep 16, 2026
@evenkkl evenkkl requested a review from a team as a code owner September 16, 2026 19:41
Copy link
Member

@rachelks rachelks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the changes locally, including keyboard navigation, Previous/Next focus behavior and removing favorites. All checks pass and everything works as expected.

@rachelks rachelks merged commit 247db49 into main Sep 17, 2026
1 check passed
Sign in to join this conversation on GitHub.
Labels
area: a11y Accessibility: semantics, labels, focus priority: high Required for first delivery type: feature New functionality or requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: improve accessibility of the library controls and book viewer
3 participants